package com.study.demo.aop.demo1_1;

import com.study.demo.aop.demo1_2.annotation.EnableLogging;
import org.springframework.cache.CacheManager;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cache.concurrent.ConcurrentMapCacheManager;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.Arrays;

/**
 * @author: elvin
 * @time: 2019-10-12 16:19
 * @desc:
 **/
@EnableCaching
@EnableLogging
@Configuration
public class LogConfig {

    @Bean
    public IUserService userService() {
        return new UserService();
    }

    @Bean
    public CacheManager cacheManager(){
        return new ConcurrentMapCacheManager();
    }
}
